export const submitDateFormat = function (list) {
  list.forEach((item, index) => {
    let currentDate = new Date(item.submitDate)
    let differenceDate = new Date().getTime() - item.submitDate
    if (differenceDate < 60 * 1000) {
      list[index].submitDate = (differenceDate / 1000).toFixed(0) + '秒前'
    } else if (differenceDate < 60 * 60 * 1000) {
      list[index].submitDate = (differenceDate / 60 / 1000).toFixed(0) + '分钟前'
    } else if (differenceDate < 60 * 60 * 24 * 1000) {
      list[index].submitDate = (differenceDate / 60 / 60 / 1000).toFixed(0) + '小时前'
    } else if (differenceDate < 60 * 60 * 24 * 10 * 1000) {
      list[index].submitDate = (differenceDate / 60 / 60 / 24 / 1000).toFixed(0) + '天前'
    } else {
      list[index].submitDate = currentDate.getFullYear() + '年' + (currentDate.getMonth() + 1) + '月' + currentDate.getDate() + '日'
    }
    // list[index].voiceContent = this.removeHTMLTag(item.voiceContent)
  })
  return list;
}